//
//  NormalTableViewCell.m
//  YiChe
//
//  Created by 蒋杏飞 on 15/8/8.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "NormalTableViewCell.h"
#import "ListModel.h"
#import "UIImageView+WebCache.h"
@interface NormalTableViewCell ()
@property (nonatomic, retain) UIImageView *showImage;
@property (nonatomic, retain) UILabel *titleLabel;
@property (nonatomic, retain) UILabel *fromLabel;
@property (nonatomic, retain) UIButton *commentButton;

@end

@implementation NormalTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initionalSubViews];
    }
    return self;
}


- (void)initionalSubViews
{
    self.showImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 20, 100, 50)];
    self.showImage.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.showImage];
    [self.showImage release];
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(_showImage.frame.size.width + _showImage.frame.origin.x + 10, 20, [UIScreen mainScreen].bounds.size.width - _showImage.frame.size.width - _showImage.frame.origin.x - 10, 40)];
    [_titleLabel setNumberOfLines:2];
    [self.contentView addSubview:_titleLabel];
    [_titleLabel release];
    
}
- (void)setValuesWithModel:(ListModel *)model
{
    self.titleLabel.text = model.title;
    [self.showImage sd_setImageWithURL:[NSURL URLWithString:model.picCover] placeholderImage:nil];
}



@end







